count = 0
card = int(input("请输入数字："))
while True:
    if count <3:
        user_guess = int(input("请猜一猜："))
        if card == user_guess:
            print("恭喜你答对了！")
            break
        elif card > user_guess:
             print("你猜的数值偏小了。")
        else:
             print("你猜的数值偏大了。")
    else:
        print("已经猜得够多了，没有机会了哦")
        break
    count = count+1